import { createWebHashHistory, createRouter } from 'vue-router'
// import Login from '@/views/login/index.vue'
// import Layout from '@/layout/index.vue'
import { constantRoutes } from './constantRoutes'
import { dynamicRoutes } from './dynamicRoutes'
const routes = [

    ...constantRoutes,
    ...dynamicRoutes
    // { path: '/', redirect: '/home' },
    // { path: '/login', component: Login },
    // {
    //     path: '/',
    //     component: Layout,
    //     children: [{
    //         path: '/home',
    //         component: () => import('@/views/home/index.vue'),
    //     },]
    // },

]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
// router.beforeEach((to, from) => {
//     // ...
//     // 返回 false 以取消导航

//   // set page title

//     return true
// })
export default router